package github.flandre.examplemod.core.init;

import github.flandre.examplemod.common.block.ExampleBlock;
import github.flandre.examplemod.common.container.ExampleGuiContainer;
import github.flandre.examplemod.common.guiblock.MyIntArray;
import github.flandre.examplemod.common.guiblock.containers.ExampleBurnMachineContainers;
import github.flandre.examplemod.examplemod;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.potion.Effect;
import net.minecraftforge.common.extensions.IForgeContainerType;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;

public class ContainerInit {
    public static final DeferredRegister<ContainerType<?>> CONTAINERS_TYPE = DeferredRegister.create(ForgeRegistries.CONTAINERS, examplemod.MODID);

    public static final RegistryObject<ContainerType<ExampleGuiContainer>> EXAMPLE_GUI_CONTAINER =
            CONTAINERS_TYPE.register("example_gui_containers",
                    ()->IForgeContainerType.create(ExampleGuiContainer::new));

    public static final RegistryObject<ContainerType<ExampleBurnMachineContainers>> obsidianFirstContainer =
            CONTAINERS_TYPE.register("example_burn_containers",
                    () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) ->
                            new ExampleBurnMachineContainers(windowId, inv, data.readBlockPos(),
                                    Minecraft.getInstance().world, new MyIntArray())));


}
